using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Itdavany.Data;
using Itdavany.Utility;

namespace Itdavany.Objects
{
    public class TextPanel : Widget
    {
        public Font Font;
        public Color FontColor;
        public string Text;
        public bool Wrapping = false;

        public override void Draw()
        {
            if (!string.IsNullOrEmpty(Text))
            {
                if (Wrapping)
                {
                    Font.TextBox(AreaRect, FontColor, Text);
                }
                else
                {
                    Font.DrawString(this.X, this.Y, FontColor, Text);
                }
            }

            base.Draw();
        }
    }
}